package com.jiuli.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jiuli.model.dto.space.SpaceAddRequest;
import com.jiuli.model.dto.space.SpaceQueryRequest;
import com.jiuli.model.pojo.Space;
import com.jiuli.model.pojo.Space;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jiuli.model.pojo.User;
import com.jiuli.model.vo.SpaceVO;

/**
 * <p>
 * 空间 服务类
 * </p>
 *
 * @author jiuli
 * @since 2025-01-19
 */
public interface ISpaceService extends IService<Space> {

    long addSpace(SpaceAddRequest spaceAddRequest, User loginUser);

    void validSpace(Space space, boolean add);

    SpaceVO getSpaceVO(Space space);

    Page<SpaceVO> getSpaceVOPage(Page<Space> spacePage);

    QueryWrapper<Space> getQueryWrapper(SpaceQueryRequest spaceQueryRequest);

    void fillSpaceBySpaceLevel(Space space);

    void checkSpaceAuth(User loginUser, Space space);
}
